package com.yamed.customer.client;

import feign.hystrix.FallbackFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

/**
 * @Author: wchen
 * @Description:
 * @Date: Created in 2019-08-28 14:32
 * Copyright 本内容仅限于杭州阿拉丁信息科技股份有限公司内部传阅，禁止外泄以及用于其他的商业目的
 */
@Component
public class OrderClientFallBack implements FallbackFactory<OrderClient> {
    private final Logger logger = LoggerFactory.getLogger(this.getClass());

    @Override
    public OrderClient create(Throwable throwable) {
        logger.info("OrderClientFallBack.create");
        return new OrderClient() {
            @Override
            public Integer countAllOrders(Long userId) {
                return null;
            }
        };
    }
}
